package com.yehangtech.designpattern.创建型_工厂方法.service;

public class GoodsFactory {

    public IPrize getPrize(Integer type) {
        if (null == type) return null;
        else if (1 == type) return new CouponsPrizeService();
        else if (2 == type) return new EntityPrizeService();
        else throw new RuntimeException("不存在");
    }
}
